﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LEARNREN.COM.UI.LabelProviders
{
    /// <summary>
    /// 幻灯标签
    /// </summary>
    class SlideLabel : AbstractLabelProvider
    {
        public SlideLabel(string label)
            : base(label)
        {

        }

        public override string GetHtml()
        {
            try
            {
                string[] paras = LabelProviderHelper.GetProperties(this.LabelString);
                if (paras.Length > 2)
                {
                    return string.Format("<script type=\"text/javascript\">showSlide({0},{1},{2});</script>", paras[0], paras[1],paras[2]);
                }
                else
                {
                    return this.LabelString;
                }
            }
            catch
            {
                return this.LabelString;
            }
        }
    }
}
